package by.yakusekmaxim.bookgid.services;

import java.util.List;

import javax.persistence.metamodel.SingularAttribute;

import org.springframework.transaction.annotation.Transactional;

import by.yakusekmaxim.bookgid.datamodel.Image;

public interface ImageService {

	Long getCount();

	List<Image> getAllImages(SingularAttribute<Image, ?> attr,
			boolean ascending, int startRecord, int pageSize);

	Image get(Long id);

	@Transactional
	void saveOrUpdate(Image image);

	@Transactional
	void delete(Image image);

	@Transactional
	void deleteAll();
	
	@Transactional
    List<Image> getAll();

	String getRootFolder();

}
